// 设置
<template>
  <el-row class="content">
    <el-row>
      用户设置
    </el-row>

    <el-row style="margin-top:10px;">

    </el-row>

  </el-row>
</template>

<script>
  import { mapGetters } from 'vuex'
  import { user as userMap } from '@/utils/map' // 参数映射

  export default {
    computed: {
      ...mapGetters(['memberHistory']),
      list() {
        return this.memberHistory ? Object.values(this.memberHistory) : []
      },
    },
    data() {
      return {
        loading: false,
        userMap: userMap, // 用户字段映射
        currentPage: 1,
        pageSize: 10,
        pickDate: null,
      }
    },

    // 数据格式化
    filters: {},

    async created() {
      await this.fetchData()
    },
    methods: {
      async fetchData() {
        await this.$store.dispatch('MemberOrdersHistory', {
          page: this.currentPage,
          'per-page': this.pageSize,
        })
      },
      // 当前页变化
      async pickerChange(value) {
        console.log(value)
        await this.fetchData()
      },
    },
    watch: {
      $route(to, from) {},
    },
  }
</script>
<style>
  .content {
    padding: 5px;
  }
</style>

